home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TPWENG / TBLEXIST.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-22  |  507b  |  27 lines

  1. program TblExits;
  2. uses PXEngine, WinCrt, WinTypes;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       Exist: Bool;
  8.  
  9. procedure PX(Code : integer);
  10. begin
  11.   writeln(PXErrMsg(Code));
  12. end;
  13.  
  14. begin
  15.   PX(PXWinInit('MyApp', pxShared));
  16.  
  17.   (* See if table exists *)
  18.   PxErr := PXTblExist(TableName, Exist);
  19.   if PxErr <> PxSuccess then
  20.     Writeln(PxErrMsg(PxErr))
  21.   else if Exist then
  22.          Writeln('Table exists')
  23.        else Writeln('Table does not exist');
  24.  
  25.   PX(PXExit);
  26. end.
  27.